import com.aliyun.oss.OSSClient;
import com.atguigu.oss.utils.ConstantPropertiesUtils;
import org.junit.Test;

/**
 * @Author zzc
 * @Date 2022/9/10 15:50
 * @Version 1.0
 */
public class test {
    @Test

    public void testExist() {
        String endpoint = "oss-cn-beijing.aliyuncs.com";
        String accessKeyId = "LTAI5t8eioFP68bs7wd48VSJ";
        String accessKeySecret = "nqJvFvxWG2CnTIvHJSCKDXmznfenZn";
        String bucketName = "edu-guli-0908";
        System.out.println(accessKeyId);
        OSSClient ossClient = new OSSClient(endpoint, accessKeyId, accessKeySecret);

        boolean exists = ossClient.doesBucketExist(bucketName);

        System.out.println(exists);

        ossClient.shutdown();

    }
}
